package com.lxy.ioc;

import com.lxy.ioc.Cotroller.UserCotroller;
import com.lxy.ioc.component.UserComponent;
import com.lxy.ioc.model.UserInfo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.ApplicationContext;


@ComponentScan("com.lxy.ioc")
@SpringBootApplication
public class DemoApplication {

	public static void main(String[] args) {
		ApplicationContext context = SpringApplication.run(DemoApplication.class, args);

		/*UserCotroller bean = context.getBean(UserCotroller.class);
		bean.say();*/

		UserComponent bean = context.getBean(UserComponent.class);
		bean.say();
	/*	UserInfo bean = context.getBean(UserInfo.class);
		System.out.println(bean);*/
		/*Object userInfo1 = context.getBean("cxk");
		System.out.println(userInfo1);*/


	}


}
